Skip to content

v0.3.2: safer connection check and first() error handling - #5

Merged
ivodraginov-cloud merged 1 commit into
mainfrom
fix/0.3.2-auth-and-first
Nov 11, 2026
Merged

ivodraginov-cloud merged 1 commit into
mainfrom
fix/0.3.2-auth-and-first

Conversation

@ivodraginov-cloud

Copy link
Copy Markdown
Contributor

What

  • Connection check. Make cannot treat HTTP 400 as success, so the empty /v1/address/verify test always failed. The check now POSTs a fixed autocomplete query (searchCriteria.query = 1600 Penn, take 1) and is valid only on HTTP 2xx when body.result is present. A 200 HTML error page is rejected as InvalidAccessTokenError.
  • first() mappings. Get Property Details, Verify Address, and the billed instant trigger's property lookup use first(ifempty(path, emptyarray)) plus response.valid. A 401 JSON body or a 200 HTML page now surfaces as InvalidAccessTokenError instead of IMLError: Function 'first' finished with error! Invalid array.

The shared catalog.json is unchanged. npm test is 80/80.

Why

A Make review scenario that used an invalid token failed with IMLError on first() instead of InvalidAccessTokenError, because Make evaluated the output mapping on a 200 HTML body (and would do the same on a 401 JSON body that has no results array).

…ndling

Make treats HTTP 400-599 as errors, so the empty address-verify connection
check could not succeed. The check now POSTs a fixed autocomplete query and
is valid only on 2xx responses that include body.result, so a 200 HTML page
is rejected as InvalidAccessTokenError.

first() on Get Property Details, Verify Address, and the billed instant
trigger's property lookup is guarded with ifempty(..., emptyarray). Those
modules also set response.valid so a 401 JSON body or HTML page surfaces as
InvalidAccessTokenError instead of IMLError ("Invalid array"). Tests cover
the new connection check, the guards, and the error type.
@ivodraginov-cloud
ivodraginov-cloud merged commit 6497d61 into main Nov 11, 2026
1 check passed
@ivodraginov-cloud
ivodraginov-cloud deleted the fix/0.3.2-auth-and-first branch November 11, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants